package com.yiyuan.app.dao;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.guaike.core.mybatis.plugins.BaseDAO;
import com.yiyuan.app.entity.po.GConfRoomDevicePO;
import com.yiyuan.app.mapper.GConfRoomDeviceMapper;
import org.springframework.stereotype.Repository;

@Repository
public class GConfRoomDeviceDAO extends BaseDAO<GConfRoomDeviceMapper, GConfRoomDevicePO> {


    public GConfRoomDevicePO findOne(Long roomId, String positionNo) {
        LambdaQueryWrapper<GConfRoomDevicePO> queryWrapper = new LambdaQueryWrapper<>();
        queryWrapper.eq(GConfRoomDevicePO::getRoomId, roomId);
        queryWrapper.eq(GConfRoomDevicePO::getPositionNo, positionNo);
        return getBaseMapper().selectOne(queryWrapper);
    }
}
